package pe.bf.extranet.ejb;

import pe.bf.domain.bean.Abono;
import pe.bf.domain.bean.SolicitudAbono;
import pe.bf.domain.exceptions.DomainException;

public class SolicitudAbonoEJBProxy implements SolicitudAbonoEJB {
  private String _endpoint = null;
  private SolicitudAbonoEJB solicitudAbonoEJB = null;
  
  public SolicitudAbonoEJBProxy() {
    _initSolicitudAbonoEJBProxy();
  }
  
  public SolicitudAbonoEJBProxy(String endpoint) {
    _endpoint = endpoint;
    _initSolicitudAbonoEJBProxy();
  }
  
  private void _initSolicitudAbonoEJBProxy() {
    try {
      solicitudAbonoEJB = (new SolicitudAbonoEJBServiceLocator()).getSolicitudAbonoEJBPort();
      if (solicitudAbonoEJB != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)solicitudAbonoEJB)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)solicitudAbonoEJB)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (solicitudAbonoEJB != null)
      ((javax.xml.rpc.Stub)solicitudAbonoEJB)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public SolicitudAbonoEJB getSolicitudAbonoEJB() {
    if (solicitudAbonoEJB == null)
      _initSolicitudAbonoEJBProxy();
    return solicitudAbonoEJB;
  }
  
  public void init() throws java.rmi.RemoteException{
    if (solicitudAbonoEJB == null)
      _initSolicitudAbonoEJBProxy();
    solicitudAbonoEJB.init();
  }
  
  public java.lang.String[] createSolicitudAbono(SolicitudAbono arg0) throws java.rmi.RemoteException, Exception, DomainException{
    if (solicitudAbonoEJB == null)
      _initSolicitudAbonoEJBProxy();
    return solicitudAbonoEJB.createSolicitudAbono(arg0);
  }
  
  public void actualizarSolicitudAbono(SolicitudAbono arg0) throws java.rmi.RemoteException, DomainException{
    if (solicitudAbonoEJB == null)
      _initSolicitudAbonoEJBProxy();
    solicitudAbonoEJB.actualizarSolicitudAbono(arg0);
  }
  
  public void eliminarSolicitudAbono(SolicitudAbono arg0) throws java.rmi.RemoteException, DomainException{
    if (solicitudAbonoEJB == null)
      _initSolicitudAbonoEJBProxy();
    solicitudAbonoEJB.eliminarSolicitudAbono(arg0);
  }
  
  public SolicitudAbono[] listarSolicitudAbono() throws java.rmi.RemoteException, DomainException{
    if (solicitudAbonoEJB == null)
      _initSolicitudAbonoEJBProxy();
    return solicitudAbonoEJB.listarSolicitudAbono();
  }
  
  public SolicitudAbono[] listarSolicitudAbonoPorEmpresa(java.math.BigInteger arg0) throws java.rmi.RemoteException, DomainException{
    if (solicitudAbonoEJB == null)
      _initSolicitudAbonoEJBProxy();
    return solicitudAbonoEJB.listarSolicitudAbonoPorEmpresa(arg0);
  }
  
  public Abono[] listarDetalleSolicitudAbono(java.math.BigInteger arg0, java.math.BigInteger arg1) throws java.rmi.RemoteException, DomainException{
    if (solicitudAbonoEJB == null)
      _initSolicitudAbonoEJBProxy();
    return solicitudAbonoEJB.listarDetalleSolicitudAbono(arg0, arg1);
  }
  
  
}